package com.buddies.lottery.data.bean;

import com.buddies.lottery.utils.LotteryUtils;

import java.io.Serializable;

public class LotteryBetRecord implements Serializable {

    public int id;
    public Lottery lottery;
    public String period;
    public LotteryTabOptions option;
    public int money;
    public long create_at;
    public int status;
    public float win_money;

    public String getStatus() {
        String statusText = "未开奖";
        if (status == 1) {
            statusText = "已中奖";
        } else if (status == 2) {
            statusText = "未中奖";
        }
        return statusText;
    }

    public String getWinMoney() {
        float win = win_money;
        if (status == 1 && win == 0) {
            win = Float.parseFloat(option.odds) * money;
        }
        return LotteryUtils.formatMoney(win);
    }

}
